module.exports = function(grunt) {

  // Initializes the Grunt tasks with the following settings
  grunt.initConfig({

    // A list of files, which will be syntax-checked by JSHint
    jshint: {  },

    // Files to be concatenated … (source and destination files)
    concat: {
      options: {
        separator: ';',
        stripBanners: true
      },
      dist: {
        src: ['js/vendor/jquery-1.9.1.min.js',
			  'js/vendor/modernizr-2.6.2.min.js',				
			  'js/vendor/less-1.3.3.min.js',				
			  // 'js/bootstrap/bootstrap-transition.js',
			  // 'js/bootstrap/bootstrap-collapse.js',
			  // 'js/bootstrap/bootstrap-carousel.js',
              'js/homepage.js',
              'js/toggle.js',
              'js/jquery.validate.min.js',
              'js/additional-methods.js',
              'js/formValidate.js',
              'js/HomeFormVelidation.js'
			  
			  ],
        dest: 'js/main.min.js'
      }
    },

    // … and minified (source and destination files)
    uglify: {
      my_target: {
        files: {
          'js/main.min.js': ['js/main.min.js']
        }
      }  
    },

    // Tasks being executed with 'grunt watch'
    watch: {		
		js: {
          files: ['js/*.js', 'js/vendor/*.js'],
          tasks: ['concat:js', 'uglify:js'],
          options: {
            livereload: true,
          }
      },
	css: {
		  files: ['style/*.less'],
		  tasks: ['less:css'],
		  options: {
			livereload: true,
		  }
      }
	},

    // Tasks being executed with 'grunt less'
    less: {
      production: {
        options: {
          paths: ['css'],
          yuicompress: true
        },
        files: {
          'style/main.min.css': 'style/main.less'
        }
      }
    }

  });

  // Load the plugins that provide the tasks we specified in package.json.
  // grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  // grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-less');


  // This is the default task being executed if Grunt
  // is called without any further parameter.
  grunt.registerTask('default', ['concat', 'uglify', 'less']);

};